{extends 'package_general.html'}
{block name="main"} 		
		<div id="content-table-inner">
			<!--  start table-package  -->
	{if isset($pckgOption->id) && $pckgOption->id ne ""}
		<form id="form1" action="ctlr_packagepckgOption-act_update" method="post">	
			<input type="hidden" name="id" value="{$package->id}">
			<input type="hidden" name="pckgOption_id" value="{$pckgOption->id}">
	{else}
		<form id="form1" action="ctlr_packagepckgOption-act_save" method="post">	
			<input type="hidden" name="id" value="{$package->id}">
	{/if}	
		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
				<tr>
					<th valign="top">Postion:</th>
					<td>
						<input type="text" size="3" name="position" 
						
						value="{$pckgOption->position}"/>
					</td>	
					<td>
						{if isset($validate_errors['postion'])}
							<div class="error-left"></div>
							<div class="error-inner">This field is required.</div>
						{else}
							<div class="bubble-left"></div>
							<div class="bubble-inner">Please provide position.0 for default Options</div>
							<div class="bubble-right"></div>
						{/if}
					</td>
				</tr>
				<tr>
					<th valign="top">Name:</th>
					<td>
						<input type="text" name="name" 
						{if isset($validate_errors['name'])}
							class="inp-form-error" 
						{else} 
							class="inp-form" 
						{/if} 
						value="{$pckgOption->name}"/>
					</td>	
					<td>
						{if isset($validate_errors['name'])}
							<div class="error-left"></div>
							<div class="error-inner">This field is required.</div>
						{else}
							<div class="bubble-left"></div>
							<div class="bubble-inner">This field is required.</div>
							<div class="bubble-right"></div>
						{/if}
					</td>
				</tr>
				<tr>
					<th valign="top">Type:</th>
					<td>
						<input type="text" name="type" 
						{if isset($validate_errors['type'])}
							class="inp-form-error" 
						{else} 
							class="inp-form" 
						{/if} 
						value="{$pckgOption->type}"/>
					</td>	
					<td>
						{if isset($validate_errors['type'])}
							<div class="error-left"></div>
							<div class="error-inner">This field is required.</div>
						{else}
							<div class="bubble-left"></div>
							<div class="bubble-inner">Please enter the type.</div>
							<div class="bubble-right"></div>
						{/if}
					</td>
				</tr>
				<tr>
					<th valign="top">Code:</th>
					<td>
						<input type="text" name="code" 
						{if isset($validate_errors['code'])}
							class="inp-form-error" 
						{else} 
							class="inp-form" 
						{/if} 
						value="{$pckgOption->code}"/>
					</td>	
					<td>
						{if isset($validate_errors['code'])}
							<div class="error-left"></div>
							<div class="error-inner">This field is required.</div>
						{else}
							<div class="bubble-left"></div>
							<div class="bubble-inner">Please enter the code.</div>
							<div class="bubble-right"></div>
						{/if}
					</td>
				</tr>
				<tr>
					<th valign="top">Description:</th>
					<td>
						<textarea id="elm1" rows="" cols="" name="desc" class="form-textarea">{$pckgOption->longdesc}</textarea>
					</td>	
					<td>
						<div class="bubble-left"></div>
						<div class="bubble-inner">You can use editor for long description.</div>
						<div class="bubble-right"></div>
					</td>
				</tr>
				<tr>	
					<th>&nbsp;</th>
					<td valign="top">
						<input type="submit" name="Submit" value="Submit" class="form-submit" />
						<input type="reset" value="" class="form-reset"  />
					</td>
					<td></td>
				</tr>
			</table>	
		</form>	
			
			<div id="table-content">
				<!--  start product-table ..................................................................................... -->
				<form id="mainform" action="#" method="post">
					<input type="hidden" name="id" value="{$package->id}">
					<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
						<tr>
							<th class="table-header-check"><a id="toggle-all" ></a> </th>
							<th class="table-header-repeat line-left minwidth-1"><a href="">Position</a></th>
							<th class="table-header-repeat line-left minwidth-1"><a href="">Name</a></th>
							<th class="table-header-options line-left"><a href="">Options</a></th>
						</tr>
						{section name=nr loop=$pckgOptions}
						<tr {if $smarty.section.nr.iteration is odd} class="alternate-row"{/if}>
							<td><input name="pckgOption_ids[]" value="{$pckgOptions[nr].id}" type="checkbox"/></td>
							<td>{$pckgOptions[nr].position}</td>
							<td>{$pckgOptions[nr].name}</td>
							<td class="options-width">
								<a href="ctlr_packagepckgOption-act_edit?id={$package->id}&pckgOption_id={$pckgOptions[nr].id}" title="edit" class="icon-1 info-tooltip"></a>
								<a href="ctlr_packagepckgOption-act_delete?id={$package->id}&pckgOption_id={$pckgOptions[nr].id}" title="delete" class="icon-2 info-tooltip"></a>
							</td>
						</tr>
						{sectionelse}
						<tr><td colspan="4" align="center"><br><b>no pckgOptions found. </b> <br> </td></tr>
						{/section}				
					</table>
				<!--  end product-table................................... --> 
				</form>
			</div>
			<!--  end imagex-table  -->
		
			<!--  start actions-box ............................................... -->
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
					<a href="" onclick="document.forms['mainform'].submit();return false;" class="action-edit">assign</a>
				</div>
				<div class="clear"></div>
			</div>
			<!-- end actions-box........... -->
			
			<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<a href="#" class="page-far-left"></a>
				<a href="#" class="page-left"></a>
				<div id="page-info">Page <strong>1</strong> / 15</div>
				<a href="#" class="page-right"></a>
				<a href="#" class="page-far-right"></a>
			</td>
			<td>
			<select  class="styledselect_pages">
				<option value="">Number of rows</option>
				<option value="">1</option>
				<option value="">2</option>
				<option value="">3</option>
			</select>
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
			<div class="clear"></div>
		</div>
{/block}